package cn.blnp.net.flowable.boot.demo;

import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.RepositoryService;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.impl.util.CommandContextUtil;
import org.flowable.engine.repository.DeploymentBuilder;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;

/**
 * <h3></h3>
 *
 * @author <a href="mailto:blnp.yibin@qq.com">lyb</a>
 * @version 1.0
 * @since 2025/5/28 11:16
 */
@Slf4j
@SpringBootTest
public class DeployFlowTest {

    @Resource
    private DeploymentBuilder  deploymentBuilder;
    @Resource
    private RuntimeService runtimeService;
    @Resource
    private RepositoryService repositoryService;

    @Test
    public void test() {
        repositoryService.createDeployment()
                .addClasspathResource("processes/deploy-flow.bpmn20.xml")
                .deploy();
    }
}
